import instacne from "../request";
import type { Ref } from "vue";
import qs from "qs";

/**
 * 登录返回数据
 */
interface IAdminLoginParams {
  password: string;
  username: string;
}
interface IAdminLoginRes {
  tokenHead: string;
  token: string;
}
const adminLogin = (data: IAdminLoginParams): Promise<IAdminLoginRes> => {
  // instacne.post("/auth/login", data); 是一个 Promise 类型
  return instacne.post("/admin/login", data);
};

/**
 * 获取当前登录用户信息
 */
interface IAdminInfoRes {
  menus: IMneuItem[];
  icon: string;
  username: string;
  roles: string[];
}
const getAdminInfo = (): Promise<IAdminInfoRes> => {
  return instacne.get("/admin/info");
};
interface IAdminziyuanRes {
  categoryId: number;
  createTime: string;
  description: string;
  id: number;
  name: string;
  url: string;
}

/**
 * /admin/list 根据用户名或者姓名获取用户列表
 */
interface IAdminListParams {
  keyword?: string | Ref<string>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
  name?: string | Ref<string>;
  type?: number | Ref<number>;
}
interface IAdminListItem {
  createTime: string;
  email: string;
  icon: string;
  id: number;
  loginTime: string;
  nickName: string;
  note: string;
  password: string;
  status: number;
  username: string;
  name: string;
}
interface IAdminListRes {
  list: IAdminListItem[];
  pageNum: number;
  pageSize: number;
  total: number;
  totalPage: number;
}
interface IOrdersetting {
  id: number;
  code: number;
  data: {
    commentOvertime: number;
    confirmOvertime: number;
    finishOvertime: number;
    flashOrderOvertime: number;
    id: number;
    normalOrderOvertime: number;
  };
  message: string;
}
interface IAdvertise {
  code: number;
  data: {
    list: [
      {
        clickCount: number;
        endTime: string;
        id: number;
        name: string;
        note: string;
        orderCount: number;
        pic: string;
        sort: number;
        startTime: string;
        status: number;
        type: number;
        url: string;
      }
    ];
    pageNum: number;
    pageSize: number;
    total: number;
    totalPage: number;
  };
  message: string;
}

interface IAdminAdd {
  name: string;
  id: number;
}
interface IAdminziyuanRes {
  categoryId: number;
  createTime: string;
  description: string;
  id: number;
  name: string;
  url: string;
}
const getAdminList = (
  data?: IAdminListParams | any
): Promise<IAdminListRes> => {
  return instacne.get("/admin/list", {
    params: data,
  });
};
/**
 * 新增用户
 * admin/register
 */
const adminRegister = (data: IAdminListItem): Promise<IAdminListItem> => {
  return instacne.post("/admin/register", data);
};
/**
 * /admin/update/{id}
 *  修改指定用户信息
 */
const adminUpdate = (data: IAdminListItem) => {
  return instacne.post(`/admin/update/${data.id}`, data);
};
// 获取资源列表
const adminziyuanList = (): Promise<IAdminInfoRes> => {
  return instacne.get("/resource/listAll");
};
// 秒杀活动详情/flash/list
// 获取活动详情

// Parameters
interface IAdminMSList {
  keyword?: string | Ref<string>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
}
interface IAdminmsList {
  createTime: string;
  endDate: string;
  id: number;
  startDate: string;
  title: string;
}
interface IAdminMsRes {
  list: any;
  pageNum: number;
  pageSize: number;
  total: number;
  totalPage: number;
}
const adminmsList = (data?: IAdminMSList): Promise<IAdminMsRes> => {
  return instacne.get("/flash/list", {
    params: data,
  });
};

// /attrInfo/{productCategoryId} 商品属性列表

const attribute = (data?: IAdminListParams): Promise<IAdminListRes> => {
  return instacne.get("/productAttribute/category/list", {
    params: data,
  });
};
// /productAttribute/create 商品属性添加
interface IAdminDelete {
  filterType: number;
  handAddStatus: number;
  inputList: string;
  inputType: number;
  name: string;
  productAttributeCategoryId: number;
  relatedStatus: number;
  searchType: number;
  selectType: number;
  sort: number;
  type: number;
}
// 添加属性列表
interface AdminAdd {
  name: string;
  id: number;
}
const adminAddForm = (data: AdminAdd): Promise<IAdminListItem> => {
  return instacne.post("/productAttribute/category/create", qs.stringify(data));
};
// 删除属性列表
const adminDeleteForm = (data: number): Promise<IAdminDelete> => {
  return instacne.get(`/productAttribute/category/delete/${data}`);
};
// 编辑属性列表
const adminListbj = (data: IAdminAdd): Promise<IAdminDelete> => {
  let datas = {
    name: data.name,
  };
  return instacne.post(
    `/productAttribute/category/update/${data.id}`,
    qs.stringify(datas)
  );
};

// 退货列表
const returnGoodsAll = (data?: IAdminListParams): Promise<IAdminListRes> => {
  return instacne.get("/returnReason/list", {
    params: data,
  });
};

// 添加退货请求
interface IAddReturnGoods {
  createTime: string;
  id: number;
  name: string;
  sort: number;
  status: number;
}

export const addReturnGoods = (
  data: IAddReturnGoods
): Promise<IAddReturnGoods> => {
  return instacne.post("/returnReason/create", data);
};

// returnReason/update/{id}
// 修改退货原因
const changeReturnGoods = (data: IAddReturnGoods): Promise<IAddReturnGoods> => {
  return instacne.post(`/returnReason/update/${data.id}`, data);
};

// 修改退货原因状态
interface IgoodsStatus {
  ids: number;
  status: number;
}
const changeReturnGoodsStatus = (data: IgoodsStatus): Promise<IgoodsStatus> => {
  return instacne.post(
    `/returnReason/update/status?status=${data.status}&ids=${data.ids}`
  );
};

// 删除退货原因
const delRouterGoods = (data: number): Promise<null> => {
  return instacne.post(`/returnReason/delete?ids=${data}`);
};
// /productAttribute/list/{cid} 商品属性列表
const AttributeList = (
  data: AttributeListItiem | undefined
): Promise<IAdminListRes> => {
  console.log(data);

  return instacne.get(`/productAttribute/list/${data?.cid}`, {
    params: {
      pageNum: data?.pageNum,
      pageSize: data?.pageSize,
      type: data?.type,
    },
  });
};
interface AttributeListItiem {
  cid?: number;
  pageNum?: number;
  pageSize?: number;
  type?: number;
}

// 添加商品属性

const AddGoods = (data: IAdminListItem): Promise<IAdminListItem> => {
  return instacne.post("/productAttribute/create", data);
};
interface AddGoodsItem {
  filterType: number;
  handAddStatus: number;
  inputList: string;
  inputType: number;
  name: string;
  productAttributeCategoryId: number;
  relatedStatus: number;
  searchType: number;
  selectType: number;
  sort: number;
  type: number;
}
// /productAttribute/list 参数列表
const CsList = (data: AttributeListItiem): Promise<AttributeListItiem> => {
  return instacne.post(`/productAttribute/list${data?.cid}`, {
    params: {
      pageNum: data?.pageNum,
      pageSize: data?.pageSize,
      type: data?.type,
    },
  });
};
// 角色列表
interface getAdminResources {
  keyword?: string | Ref<string>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
}
const getAdminallowMenu = (id: number): Promise<any[]> => {
  return instacne.get(`/role/listMenu/${id}`);
};
const getAdminRole = (data?: getAdminResources): Promise<IAdminListRes> => {
  return instacne.get("/role/list", {
    params: data,
  });
};
interface IRoleListItem {
  adminCount: number;
  createTime: string;
  description: string;
  id: number;
  name: string;
  sort: number;
  status: number;
}
//  角色列表新增
const rolesRegister = (data: IRoleListItem): Promise<IRoleListItem> => {
  return instacne.post("/role/create", data);
};

// /flash/update/status/{id}修改上下线状态

interface sxdata {
  id: number | Ref<number>;
  status: number | Ref<number>;
}
const changeSX = (data: sxdata) => {
  return instacne.post(`/flash/update/status/${data.id}?status=${data.status}`);
};

// 优惠卷列表 /coupon/list
const couponCouponsList = (
  data?: IAdminListParams | any
): Promise<IAdminListRes> => {
  return instacne.get("/coupon/list", {
    params: data,
  });
};

// 添加优惠券
interface IAddCoupon {
  amount: number;
  code: string;
  count: number;
  enableTime: string;
  endTime: string;
  id: number;
  memberLevel: number;
  minPoint: number;
  name: string;
  note: string;
  perLimit: number;
  platform: number;
  productCategoryRelationList: [
    {
      couponId: number;
      id: number;
      parentCategoryName: string;
      productCategoryId: string;
      productCategoryName: string;
    }
  ];
  productRelationList: [
    {
      couponId: number;
      id: number;
      productId: number;
      productName: string;
      productSn: string;
    }
  ];
  publishCount: number;
  receiveCount: number;
  startTime: string;
  type: number;
  useCount: number;
  useType: number;
}

//品牌推荐的接口
interface IBrandList {
  code: number;
  data: {
    list: [
      {
        brandId: number;
        brandName: string;
        id: number;
        recommendStatus: number;
        sort: number;
      }
    ];
    pageNum: number;
    pageSize: number;
    total: number;
    totalPage: number;
  };
  message: string;
}

//新品推荐的接口
interface INewProductList {
  code: number;
  data: {
    list: [
      {
        id: number;
        productId: number;
        productName: string;
        recommendStatus: number;
        sort: number;
      }
    ];
    pageNum: number;
    pageSize: number;
    total: number;
    totalPage: number;
  };
  message: string;
}

const addCoupon = (data: IAddCoupon): Promise<IAddCoupon> => {
  return instacne.get("/coupon/create", {
    params: data,
  });
};

interface IAddCouponData {
  children: [
    {
      description: string;
      icon: string;
      id: number;
      keywords: string;
      level: number;
      name: string;
      navStatus: number;
      parentId: number;
      productCount: number;
      productUnit: string;
      showStatus: number;
      sort: number;
    }
  ];
  description: string;
  icon: string;
  id: number;
  keywords: string;
  level: number;
  name: string;
  navStatus: number;
  parentId: number;
  productCount: number;
  productUnit: string;
  showStatus: number;
  sort: number;
}

// 优惠券标题 /productCategory/list/withChildren
const getTitleLists = (): Promise<IAddCouponData[]> => {
  return instacne.get("/productCategory/list/withChildren");
};
// 获取需要编辑的优惠券
const getOnecoupon = (id: number): Promise<IAddCoupon> => {
  return instacne.get(`/coupon/${id}`);
};
// 修改优惠券
const UpdateOnecoupon = (id: number, data: IAddCoupon): Promise<IAddCoupon> => {
  return instacne.post(`/coupon/update/${id}`, data);
};

interface IqueryCoupon {
  couponId?: number | Ref<number>;
  orderSn?: string | Ref<string>;
  useStatus?: number | Ref<number>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
}
interface IqueryCouponData {
  list: [
    {
      couponCode: string;
      couponId: number;
      createTime: string;
      getType: number;
      id: number;
      memberId: number;
      memberNickname: string;
      orderId: number;
      orderSn: string;
      useStatus: number;
      useTime: string;
    }
  ];
  pageNum: number;
  pageSize: number;
  total: number;
  totalPage: number;
}
// 查询具体的优惠券 /couponHistory/list
const queryCouponData = (data?: IqueryCoupon): Promise<IqueryCouponData> => {
  return instacne.get("/couponHistory/list", {
    params: data,
  });
};

// 删除对应的优惠券列表 /coupon/delete
const delCouponItem = (data: number): Promise<Object> => {
  return instacne.post("/coupon/delete/" + data);
};
// 退货申请处理列表 returnApply/list
interface IreturnApplyList {
  list: [
    {
      companyAddressId: number;
      createTime: string;
      description: string;
      handleMan: string;
      handleNote: string;
      handleTime: string;
      id: number;
      memberUsername: string;
      orderId: string;
      orderSn: string;
      productAttr: string;
      productBrand: string;
      productCount: number;
      productId: number;
      productName: string;
      productPic: string;
      productPrice: number;
      productRealPrice: number;
      proofPics: string;
      reason: string;
      receiveMan: string;
      receiveNote: string;
      receiveTime: string;
      returnAmount: number;
      returnName: string;
      returnPhone: string;
      status: number;
    }
  ];
  pageNum: number;
  pageSize: number;
  total: number;
  totalPage: number;
}
interface IreturnApply {
  createTime?: string | Ref<string>;
  handleMan?: string | Ref<string>;
  handleTime?: string | Ref<string>;
  id?: number | Ref<number>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
  receiverKeyword?: string | Ref<string>;
  status?: number | Ref<number>;
}

const returnApplyList = (data: IreturnApply): Promise<IreturnApplyList> => {
  return instacne.get("/coupon/list", {
    params: data,
  });
};
// 角色列表 分配菜单
const Distributionmenu = (): Promise<allocMenu> => {
  return instacne.get("/menu/treeList");
};

interface allocMenu {
  createTime: string;
  hidden: number;
  icon: string;
  id: number;
  level: number;
  name: string;
  parentId: number;
  sort: number;
  title: string;
  rawValue: Object;
}

interface AdminNum {
  cid?: number;
  pageNum: number;
  pageSize: number;
}
const AdminNumSize = (data: AdminNum | undefined): Promise<IAdminListRes> => {
  console.log(data);

  return instacne.get(`/productAttribute/category/list`, {
    params: {
      pageNum: data?.pageNum,
      pageSize: data?.pageSize,
    },
  });
};
// 添加商品属性/productAttribute/create
interface AdminAddCategory {
  filterType: number;
  handAddStatus: number;
  inputList: string;
  inputType: number;
  name: string;
  productAttributeCategoryId: number;
  relatedStatus: number;
  searchType: number;
  selectType: number;
  sort: number;
  type: number;
}
const AdminAddItem = (data: AdminAddCategory): Promise<AdminAddCategory> => {
  console.log(data);

  return instacne.post(`/productAttribute/create`, {
    params: {},
  });
};
// 商品分类 /productCategory/list
interface AdminAddCategoryList {
  pageNum: number;
  pageSize: number;
  parentId: number;
}
const AdminAddCategoryItem = (
  data: AdminAddCategoryList
): Promise<IAdminListRes> => {
  console.log(data);

  return instacne.get(`/productCategory/list/0`, {
    params: {
      pageNum: data?.pageNum,
      pageSize: data?.pageSize,
    },
  });
};

//订单设置
const orderSetting = (data: IOrdersetting): Promise<IOrdersetting> => {
  // console.log(data.id);

  return instacne.get(`/orderSetting/${data.id}`);
  // 优惠券标题 /productCategory/list/withChildren
  const getTitleList = (): Promise<IAdminInfoRes> => {
    return instacne.get("/productCategory/list/withChildren");
  };
};
//封装品牌推荐请求
const brandlist = (data: IBrandList): Promise<IBrandList> => {
  return instacne.get(`/home/brand/list`, data);
};
//封装新品推荐的请求
const newProduct = (data: INewProductList): Promise<INewProductList> => {
  return instacne.get(`/home/newProduct/list`, {
    data,
  });
};
//封装广告请求
const homeAdvertise = (data: any): Promise<any> => {
  return instacne.get(`/home/advertise/list`, data);
};

// /mall-admin/brand/listAll 获取全部品牌列表
interface listParams {
  keyword?: string | Ref<string>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
}
interface listAllList {
  bigPic: string;
  brandStory: string;
  factoryStatus: number;
  firstLetter: string;
  id: number;
  logo: string;
  name: string;
  productCommentCount: number;
  productCount: number;
  showStatus: number;
  sort: number;
}
interface listAllRes {
  list: listAllList[];
  id: number;
  pageNum: number;
  pageSize: number;
  total: number;
  totalPage: number;
}
const listAll = (data?: listParams | any): Promise<listAllRes> => {
  // console.log(data);
  return instacne.get("/brand/list", {
    params: data,
  });
};

// 根据编号查询品牌信息 /mall-admin/brand/{id}
interface ppinfoRes {
  bigPic: string;
  brandStory: string;
  factoryStatus: number;
  firstLetter: string;
  id: number;
  logo: string;
  name: string;
  productCommentCount: number;
  productCount: number;
  showStatus: number;
  sort: number;
}
const findppinfo = (id: number): Promise<ppinfoRes> => {
  return instacne.get(`/brand/${id}`);
};
// /brand/{id}  更新品牌

const updatePP = (id: number): Promise<ppinfoRes> => {
  return instacne.get(`/brand/${id}`);
};

// /home/recommendSubject/list分页查询推荐
interface TjRequse {
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
  recommendStatus?: number | Ref<number>;
  subjectName?: string | Ref<string>;
}
interface TjLIST {
  id: number;
  recommendStatus: number;
  sort: number;
  subjectId: number;
  subjectName: string;
}
interface TjRes {
  sort?: number;
  list: TjLIST[];
  pageNum: number;
  pageSize: number;
  total: number;
  totalPage: number;
  id: number;
}
const TjList = (data?: TjRequse): Promise<TjRes> => {
  return instacne.get("/home/recommendSubject/list", {
    params: data,
  });
};
// 修改推荐排序
interface Sort {
  id: number | Ref<number>;
  sort?: number;
}
const changeSort = (data: Sort): Promise<any> => {
  return instacne.post(
    `/home/recommendSubject/update/sort/${data.id}?sort=${data.sort}&id=${data.id}`
  );
};
interface IGoodsListParams {
  id?: number | Ref<string>;
  parentId?: string | Ref<string>;
  keyword?: string | Ref<string>;
  pageNum?: number | Ref<number>;
  pageSize?: number | Ref<number>;
}

interface IGoodsfenleiListItem {
  description: string;
  icon: string;
  id: number;
  keywords: string;
  level: number;
  name: string;
  navStatus: number;
  parentId: number;
  productCount: number;
  productUnit: string;
  showStatus: number;
  sort: number;
}

interface IGoodsfenleiListRes {
  [x: string]: any;
  list: IGoodsfenleiListItem[];
  productAttributeList: any[];
  name: string;
  pageNum: number;
  pageSize: number;
  total: number;
  totalPage: number;
}
interface IupdatenavParams {
  ids?: number | number[];
  navStatus?: number;
  showStatus?: number;
}
//添加分类接口
interface IaddproductCategory {
  description?: string;
  icon?: string;
  keywords?: string;
  name: string;
  navStatus?: number;
  parentId?: number;
  productAttributeIdList?: number | number[];
  productUnit?: string;
  showStatus?: number;
  sort?: number;
}
//品牌显示隐场参数
interface IupdateFactoryStatus {
  newStatus?: number;
  publishStatus?: number;
  recommendStatus?: number;
  factoryStatus?: number | number[];
  showStatus?: number | number[];
  ids: number | number[];
}
//所有商品请求的类型接口
interface IProductListParams {
  keyword?: string | string[];
  productSn?: string | string[];
  productCategoryId?: number;
  brandId?: number;
  publishStatus?: number;
  verifyStatus?: null;
  pageNum?: number;
  pageSize?: number;
}
//所有商品响应的数据类型接口
interface IIProductListItem {
  albumPics: string;
  brandId: number;
  brandName: string;
  deleteStatus: number;
  description: string;
  detailDesc: string;
  detailHtml: string;
  detailMobileHtml: string;
  detailTitle: string;
  feightTemplateId: number;
  giftGrowth: number;
  giftPoint: number;
  id: number;
  keywords: string;
  lowStock: number;
  name: string;
  newStatus: number;
  note: string;
  originalPrice: number;
  pic: string;
  previewStatus: number;
  price: number;
  productAttributeCategoryId: number;
  productCategoryId: number;
  productCategoryName: string;
  productSn: string;
  promotionEndTime: string;
  promotionPerLimit: number;
  promotionPrice: number;
  promotionStartTime: string;
  promotionType: number;
  publishStatus: number;
  recommandStatus: number;
  sale: number;
  serviceIds: string;
  sort: number;
  stock: number;
  subTitle: string;
  unit: string;
  usePointLimit: number;
  verifyStatus: number;
  weight: number;
}
interface IProductList {
  list: IIProductListItem[];
  pageNum: number;
  pageSize: number;
  total: number;
  totalPage: number;
}
//所有商品一级分类 productCategory/list/withChildren
const GoodsfenleiList = (
  data: IGoodsListParams
): Promise<IGoodsfenleiListRes> => {
  return instacne.get(
    `productCategory/list/${data.parentId ? data.parentId : 0}`,
    {
      params: data,
    }
  );
};
//品牌列表 /brand/list
const GoodsBrandList = (
  data: IGoodsListParams
): Promise<IGoodsfenleiListRes> => {
  return instacne.get("/brand/list", {
    params: data,
  });
};
// productAttribute/category/list分页获取所有商品属性分类
const GoodscategoryList = (
  data: IGoodsListParams
): Promise<IGoodsfenleiListRes> => {
  return instacne.get("productAttribute/category/list", {
    params: data,
  });
};
//筛选属性接口 productAttribute/category/list/withAttr
const GoodswithAttrList = (): Promise<IGoodsfenleiListRes[]> => {
  return instacne.get("productAttribute/category/list/withAttr");
};
//productCategory/delete/{id}删除商品分类
const GoodsDletefenleiList = (data: IGoodsListParams) => {
  return instacne.post(`productCategory/delete/${data.id}`);
};
//brand/delete/{id}删除品牌
const GoodsDleteBrandList = (data: IGoodsListParams) => {
  return instacne.get(`brand/delete/${data.id}`);
};
//productAttribute/category/delete/id 删除属性
const GoodsDletecategoryList = (data: IGoodsListParams) => {
  return instacne.get(`productAttribute/category/delete/${data.id}`);
};
//productCategory/list/withChildren所有一级分类及其子类
const GoodswithChildrenList = () => {
  return instacne.get("productCategory/list/withChildren");
};
// productCategory/update/navStatus 商品分类的显示隐藏ids: 94 navStatus: 0
const updatenavStatus = (data: IupdatenavParams) => {
  return instacne.post(
    `productCategory/update/navStatus?ids=${data.ids}&navStatus=${data.navStatus}`
  );
};
// productCategory/update/showStatus修改显示状态
const updatenavShowStatus = (data: IupdatenavParams) => {
  return instacne.post(
    `productCategory/update/showStatus?ids=${data.ids}&showStatus=${data.showStatus}`
  );
};
//productCategory/create添加产品分类
const addproductCategory = (data: IaddproductCategory) => {
  return instacne.post(`productCategory/create`, data);
};
//brand/update/factoryStatus批量更新厂家制造商状态
const updateFactoryStatus = (data: IupdateFactoryStatus) => {
  return instacne.post(
    `brand/update/factoryStatus?ids=${data.ids}&factoryStatus=${data.factoryStatus}`
  );
};
//brand/update/showStatus批量更新显示状态
const brandupdateshowStatus = (data: IupdateFactoryStatus) => {
  return instacne.post(
    `brand/update/showStatus?ids=${data.ids}&showStatus=${data.showStatus}`
  );
};
//product/list查询商品
const ProductList = (data: IProductListParams): Promise<IProductList> => {
  return instacne.get("product/list", {
    params: data,
  });
};
//删除商品product/update/deleteStatus?ids=1337&deleteStatus=1
const DeleteProduct = (data: IupdatenavParams) => {
  return instacne.post(
    `product/update/deleteStatus?ids=${data.ids}&deleteStatus=1`
  );
};
//修改上架状态product/update/publishStatus
const UpdatePublishStatus = (data: IupdateFactoryStatus) => {
  return instacne.post(
    `product/update/publishStatus?ids=${data.ids}&publishStatus=${data.showStatus}`
  );
};
//修改新品状态product/update/newStatus批量设为新品
const UpdatenewStatus = (data: IupdateFactoryStatus) => {
  return instacne.post(
    `product/update/newStatus?ids=${data.ids}&newStatus=${data.showStatus}`
  );
};
//product/update/recommendStatus批量推荐商品
const UpdaterecommendStatus = (data: IupdateFactoryStatus) => {
  return instacne.post(
    `product/update/recommendStatus?ids=${data.ids}&recommendStatus=${data.showStatus}`
  );
};
export {
  GoodsfenleiList,
  GoodsBrandList,
  GoodscategoryList,
  GoodswithAttrList,
  GoodsDletefenleiList,
  GoodsDleteBrandList,
  GoodsDletecategoryList,
  GoodswithChildrenList,
  updatenavStatus,
  updatenavShowStatus,
  addproductCategory,
  updateFactoryStatus,
  brandupdateshowStatus,
  ProductList,
  DeleteProduct,
  UpdatePublishStatus,
  UpdatenewStatus,
  UpdaterecommendStatus,
};
export type { IGoodsListParams, IProductListParams };

// 获取商品列表数据

export {
  adminLogin,
  getAdminInfo,
  getAdminList,
  adminRegister,
  adminUpdate,
  attribute,
  adminAddForm,
  adminDeleteForm,
  adminListbj,
  returnGoodsAll,
  changeReturnGoods,
  changeReturnGoodsStatus,
  delRouterGoods,
  adminmsList,
  couponCouponsList,
  addCoupon,
  changeSX,
  AttributeList,
  AddGoods,
  CsList,
  getAdminallowMenu,
  getAdminRole,
  orderSetting,
  rolesRegister,
  brandlist,
  newProduct,
  homeAdvertise,
  adminziyuanList,
  getTitleLists,
  getOnecoupon,
  UpdateOnecoupon,
  queryCouponData,
  delCouponItem,
  returnApplyList,
  Distributionmenu,
  AdminNumSize,
  AdminAddItem,
  AdminAddCategoryItem,
  listAll,
  findppinfo,
  updatePP,
  TjList,
  changeSort,
};
export type {
  IAdminListRes,
  IAdminLoginParams,
  IAdminLoginRes,
  IAdminListItem,
  IAdminAdd,
  IAdminDelete,
  IAddReturnGoods,
  IgoodsStatus,
  IOrdersetting,
  IAdvertise,
  IAdminmsList,
  IAdminMsRes,
  IAddCoupon,
  sxdata,
  AttributeListItiem,
  AddGoodsItem,
  getAdminResources,
  IRoleListItem,
  IBrandList,
  INewProductList,
  IAdminziyuanRes,
  IAddCouponData,
  IqueryCouponData,
  IreturnApplyList,
  AdminAdd,
  listAllRes,
  ppinfoRes,
  TjRes,
  Sort,
};
